/**
 * var extend = require("../plugin/util/extend");
 * var o1 = { a: 1, b: 1, c: 1 };
 * var o2 = { b: 2, c: 2 };
 * var o3 = { c: 3 };
 * var obj = extend({}, o1, o2, o3);
 */

	
	module.exports = function(target, varArgs) {
        if(typeof(target)=="undefined"){
            target={};
        }
        var to = Object(target);
        for (var index = 1; index < arguments.length; index++) {
          var nextSource = arguments[index];

          if (nextSource != null) { // Skip over if undefined or null
            for (var nextKey in nextSource) {
              // Avoid bugs when hasOwnProperty is shadowed
              if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
                to[nextKey] = nextSource[nextKey];
              }
            }
          }
        }
        return to;
	};
